package ic.estudocaso.beans;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;

@Entity
@Table(name="Pedido")
@Inheritance(strategy=InheritanceType.JOINED)
public class Pedido{
	
	private long idPedido;
	private Cliente cliente;
	
	@Id
	@GeneratedValue
	@Column(name="idPedido")
	public long getIdPedido(){
		return idPedido;
	}
	
	public void setIdPedido(long idPedido){
		this.idPedido = idPedido;
	}
	
	@ManyToOne
	@JoinColumn(name="Cliente_idCliente")
	public Cliente getCliente(){
		return cliente;
	}
	
	public void setCliente(Cliente cliente){
		this.cliente = cliente;
	}
	
}
